<div class="schema_wrapper">
	<div class="schema_tabs">
		<ul class="nav nav-pills">
		<?php
		foreach (Config::get('category_types') as $cat_type) {
			$class_name = '';
			if ($cat_type == $type_id) {
				$class_name = 'active';
			} ?>
			<li id="schema_tab_0" class="<?php echo $class_name; ?>">
				<a href="<?php echo CURRENT_URL, $cat_type; ?>"><?php echo __('category_type_many_' . $cat_type); ?></a>
			</li>
		<?php } ?>
		</ul>
	</div>
	<div class="schema_blocks">
		<?php if (count($cat_list) > 0) { ?>
			<div>
			<?php
			$cnt = 0;
			foreach ($cat_list as $category) {
				if ($category['level'] < 1) { continue; }
				$status_title = '-';
				$status_color = '#000';
				$class_name = ' list_item_opened';
				if (1 == intval($category['status_id'])) {
					$status_title = __('Opened');
				} else if (2 == intval($category['status_id'])) {
					$status_title = __('Closed');
					$status_color = '#777';
					$class_name = ' list_item_closed';
				} ?>
				<div style="padding-<?php echo Config::get('align', 'i18n')?>:<?php echo (($category['level'] - 1) * 10); ?>px;">
					<div id="list-<?php echo $category['id']; ?>" class="list_item_list_block" class="list_item<?php echo $class_name; ?>" style="cursor:pointer;" onclick="Core.List.openInfo(<?php echo $category['id']; ?>)">
						<div class="list_item<?php echo $class_name; ?>">
							<div style="color:<?php echo $status_color; ?>;">
								<?php echo $category['name'];
								if (!empty($category['alias'])) { ?>
									(<?php echo $category['alias']; ?>)
								<?php } ?>
							</div>
						</div>
					</div>
					<div id="info-<?php echo $category['id']; ?>" class="list_item_info_block">
						<div class="list_item_active" style="cursor:pointer;" onclick="Core.List.closeInfo()">
							<div style="color:<?php echo $status_color; ?>;">
								<?php echo $category['name']; ?>
							</div>
						</div>
						<div style="padding:5px;">
							<div style="font-size:0.8em;">
								<b style="color:#2b6fb6;"><?php echo __('Id'); ?>:</b> <?php echo $category['id']; ?>
								&nbsp;
								<b style="color:#2b6fb6;"><?php echo __('Status'); ?>:</b> <?php echo $status_title; ?>
							<?php if (!empty($category['alias'])) { ?>
								&nbsp;
								<b style="color:#2b6fb6;"><?php echo __('Alias'); ?>:</b> <?php echo $category['alias']; ?>
							<?php } ?>
							</div>
						</div>
						<div class="list_item_links">
							<a href="<?php echo BASE_URL; ?>category/update/<?php echo $category['id']; ?>" class="list_link"><?php echo __('Edit'); ?></a>
							&nbsp;
							<a href="<?php echo BASE_URL; ?>category/sequence/<?php echo $category['id']; ?>" class="list_link"><?php echo __('Sequence'); ?></a>
							&nbsp;
							<a href="<?php echo BASE_URL; ?>category/delete/<?php echo $category['id']; ?>" class="list_link"><?php echo __('Delete'); ?></a>
						</div>
					</div>
				</div>
				<?php
				$cnt++;
			} ?>
			</div>
		<?php } else {
			echo __('No categories found');
		} ?>
	</div>
</div>